﻿using Nature.Core.Boot;
using Shuttle.Core.Data;
using Shuttle.Core.Host;
using Shuttle.Core.Infrastructure;
using Shuttle.ESB.Core;
using Shuttle.ESB.SqlServer;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Nature.Core.Distributed
{
    public class DefaultHost:IHost,IDisposable
    {
        public void Dispose()
        {
            ServiceBusManager.Dispose();
        }
        public void Start()
        {
            //完成其它启动
            BootManager manager = new BootManager();
            manager.Boot();

            ServiceBusManager.Start();

            ColoredConsole.WriteLine(ConsoleColor.Green, "服务已开始。按CTRL+C停止。");
        }
    }
}
